Imports [lib].myDBconn2
Imports System.Text
Imports ccapps.Web


Namespace persistent
    Public Class TTNETSinerji
        Public Shared Function GetParentInfoForMsisdn(ByVal Msisdn As String, ByVal userid As String) As DataTable
            Dim query As String = String.Format("select * from table(EU_BILL.TTNET_SINERJI.GetParentInfoForMsisdn({0}))", Msisdn)

            Return persistent.myDBConn.myORATable_LOG(query, "null", "null", "null", Msisdn, "Select(GetParentInfoForMsisdn)", "TTNETSinerji", userid)
        End Function

        Public Shared Function GetChildInfoForParentMsisdn(ByVal Msisdn As String, ByVal userid As String) As DataTable
            Dim query As String = String.Format("select * from table(EU_BILL.TTNET_SINERJI.GetChildInfoForParentMsisdn({0}))", Msisdn)

            Return persistent.myDBConn.myORATable_LOG(query, "null", "null", "null", Msisdn, "Select(GetChildInfoForParentMsisdn)", "TTNETSinerji", userid)
        End Function

        Public Shared Function CheckRefApprovalForChildMsisdn(ByVal Msisdn As String, ByVal userid As String) As DataTable
            Dim query As String = String.Format("select * from table(EU_BILL.TTNET_SINERJI.CheckRefApprovalForChildMsisdn({0}))", Msisdn)

            Return persistent.myDBConn.myORATable_LOG(query, "null", "null", "null", Msisdn, "Select(CheckRefApprovalForChildMsisdn)", "TTNETSinerji", userid)
        End Function

        Public Shared Function CheckRefCancelChildMsisdn(ByVal Msisdn As String, ByVal userid As String) As DataTable
            Dim query As String = String.Format("select * from table(EU_BILL.TTNET_SINERJI.CheckRefCancelChildMsisdn({0}))", Msisdn)

            Return persistent.myDBConn.myORATable_LOG(query, "null", "null", "null", Msisdn, "Select(CheckRefCancelChildMsisdn)", "TTNETSinerji", userid)
        End Function

        Public Shared Function UpdateMsisdn(ByVal Pstn As String, ByVal Msisdn As String, ByVal UpdMsisdn As String, ByVal CampaignCode As String) As String
            Dim l_result As String
            Dim l_ProcedureName As String
            Dim l_Parameters_Def_Array(4) As String
            Dim l_Parameters_Val_Array(4) As String
            l_ProcedureName = "eu_bill.ttnet_sinerji.UpdateMsisdn"
            l_Parameters_Def_Array(0) = "pis_Pstn"
            l_Parameters_Def_Array(1) = "pis_Msisdn"
            l_Parameters_Def_Array(2) = "pis_UpdateMsisdn"
            l_Parameters_Def_Array(3) = "pis_CampaignCode"
            l_Parameters_Def_Array(4) = "pos_Message"
            l_Parameters_Val_Array(0) = Pstn
            l_Parameters_Val_Array(1) = Msisdn
            l_Parameters_Val_Array(2) = UpdMsisdn
            l_Parameters_Val_Array(3) = CampaignCode
            l_Parameters_Val_Array(4) = ""
            myDBConn.ORAProcedure_INOUT(l_ProcedureName, l_Parameters_Def_Array, l_Parameters_Val_Array)
            l_result = l_Parameters_Val_Array(4)
            Return l_result
        End Function

    End Class
End Namespace
